/*
	This file is part of Sandbox.

	Copyright (C) 2008  Marleine Daoud <marleine@gmail.com>

	Sandbox is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Sandbox is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License 
	along with Sandbox.  If not, see <http://www.gnu.org/licenses/>.
*/

#import "search-advanced.h"

@implementation SearchAdvancedBox

- init {
	if (self = [super init])
	{
		searchadvbox = [[[[VBox alloc] init] homogeneous: NO] spacing: 5];
		searchadgeneralbox = [[[[HBox alloc] init] 
			homogeneous: NO] spacing: 2];
		searchadgenerallabel = [[[Label alloc] init] 
			text: "Search by:"];
		searchadgeneralcombo = [[[[[[[[ComboBox alloc] init] 
			appendText: "Type"] appendText: "Border Style"] 
			appendText: "Line Border Color"] 
			appendText: "Fill Color"] appendText: "Comment"]
			 setActive: 0];
		addsearchadbutton = [[[[Button alloc] init] 
			label: "Add Search Criteria"] stock: NO];
		searchadgeneralsep = [[HSeparator alloc] init];

		findsearchadbutton = [[[[Button alloc] init] 
			label: "gtk-find"] stock: YES];

		[[searchadgeneralbox 
			packStart: searchadgenerallabel: NO: NO: 5]
			packStart: searchadgeneralcombo: YES: YES: 0];

		[[[[searchadvbox 
			packStart: searchadgeneralbox: NO: NO: 5]
			packStart: addsearchadbutton]
			packStart: searchadgeneralsep: NO: NO: 2]
			packStart: findsearchadbutton];
			
		[self addWithViewport: searchadvbox];
	}
}

- free {
	[searchadgeneralbox free];
	[searchadgenerallabel free];
	[searchadgeneralcombo free];
	[addsearchadbutton free];
	[searchadgeneralsep free];
	[searchadvbox free];

	[findsearchadbutton free];

	return [super free];
}

@end

